<!DOCTYPE html>
<html>
<!-- Created by GNU Texinfo 7.1.1, https://www.gnu.org/software/texinfo/ -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<!-- Copyright © 1988-2023 Free Software Foundation, Inc.

Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with the
Invariant Sections being "Funding Free Software", the Front-Cover
Texts being (a) (see below), and with the Back-Cover Texts being (b)
(see below).  A copy of the license is included in the section entitled
"GNU Free Documentation License".

(a) The FSF's Front-Cover Text is:

A GNU Manual

(b) The FSF's Back-Cover Text is:

You have freedom to copy and modify this GNU Manual, like GNU
     software.  Copies published by the Free Software Foundation raise
     funds for GNU development. -->
<title>Attributes (GNU Compiler Collection (GCC) Internals)</title>

<meta name="description" content="Attributes (GNU Compiler Collection (GCC) Internals)">
<meta name="keywords" content="Attributes (GNU Compiler Collection (GCC) Internals)">
<meta name="resource-type" content="document">
<meta name="distribution" content="global">
<meta name="Generator" content="makeinfo">
<meta name="viewport" content="width=device-width,initial-scale=1">

<link href="index.html" rel="start" title="Top">
<link href="Option-Index.html" rel="index" title="Option Index">
<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
<link href="GENERIC.html" rel="up" title="GENERIC">
<link href="Expression-trees.html" rel="next" title="Expression trees">
<link href="Declarations.html" rel="prev" title="Declarations">
<style type="text/css">
<!--
a.copiable-link {visibility: hidden; text-decoration: none; line-height: 0em}
span:hover a.copiable-link {visibility: visible}
strong.def-name {font-family: monospace; font-weight: bold; font-size: larger}
-->
</style>


</head>

<body lang="en">
<div class="section-level-extent" id="Attributes">
<div class="nav-panel">
<p>
Next: <a href="Expression-trees.html" accesskey="n" rel="next">Expressions</a>, Previous: <a href="Declarations.html" accesskey="p" rel="prev">Declarations</a>, Up: <a href="GENERIC.html" accesskey="u" rel="up">GENERIC</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Option-Index.html" title="Index" rel="index">Index</a>]</p>
</div>
<hr>
<h3 class="section" id="Attributes-in-trees"><span>11.5 Attributes in trees<a class="copiable-link" href="#Attributes-in-trees"> &para;</a></span></h3>
<a class="index-entry-id" id="index-attributes"></a>

<p>Attributes, as specified using the <code class="code">__attribute__</code> keyword, are
represented internally as a <code class="code">TREE_LIST</code>.  The <code class="code">TREE_PURPOSE</code>
is the name of the attribute, as an <code class="code">IDENTIFIER_NODE</code>.  The
<code class="code">TREE_VALUE</code> is a <code class="code">TREE_LIST</code> of the arguments of the
attribute, if any, or <code class="code">NULL_TREE</code> if there are no arguments; the
arguments are stored as the <code class="code">TREE_VALUE</code> of successive entries in
the list, and may be identifiers or expressions.  The <code class="code">TREE_CHAIN</code>
of the attribute is the next attribute in a list of attributes applying
to the same declaration or type, or <code class="code">NULL_TREE</code> if there are no
further attributes in the list.
</p>
<p>Attributes may be attached to declarations and to types; these
attributes may be accessed with the following macros.  All attributes
are stored in this way, and many also cause other changes to the
declaration or type or to other internal compiler data structures.
</p>
<dl class="first-deftypefn">
<dt class="deftypefn" id="index-DECL_005fATTRIBUTES"><span class="category-def">Tree Macro: </span><span><code class="def-type">tree</code> <strong class="def-name">DECL_ATTRIBUTES</strong> <code class="def-code-arguments">(tree <var class="var">decl</var>)</code><a class="copiable-link" href="#index-DECL_005fATTRIBUTES"> &para;</a></span></dt>
<dd><p>This macro returns the attributes on the declaration <var class="var">decl</var>.
</p></dd></dl>

<dl class="first-deftypefn">
<dt class="deftypefn" id="index-TYPE_005fATTRIBUTES"><span class="category-def">Tree Macro: </span><span><code class="def-type">tree</code> <strong class="def-name">TYPE_ATTRIBUTES</strong> <code class="def-code-arguments">(tree <var class="var">type</var>)</code><a class="copiable-link" href="#index-TYPE_005fATTRIBUTES"> &para;</a></span></dt>
<dd><p>This macro returns the attributes on the type <var class="var">type</var>.
</p></dd></dl>



</div>



</body>
</html>
